<template>
  <div style="height: 50px; line-height: 50px; border-bottom: 1px solid #ccc; display: flex;">
    <div style="width: 60px">
      <img src="@/assets/logo1.jpg" alt="" style="width: 50px; position: relative; top: 5px; right: 0">
    </div>
    <div style="width: 200px; padding-left: 10px; font-weight: bold; color: darkred">余姚医疗塑料展销系统后台</div>
    <div style="flex: 1">
      <el-row style="margin-top: 8px;float: right; margin-right: 40px;">
        <el-button type="primary" icon="el-icon-thumb" circle @click="$router.push('/front/home')"></el-button>
      <el-button type="primary" icon="el-icon-map-location" circle @click="$router.push('/map')"></el-button>
        <el-button type="primary" icon="el-icon-alarm-clock" circle @click="$router.push('/calendar')"></el-button>
      </el-row>
    </div>
    <div style="width: 100px">
      <el-dropdown>
        <span class="el-dropdown-link">
          <el-avatar :size="30" :src="user.avatar" style="position: relative; top: 10px"></el-avatar>
           {{ user.nickName }}
          <i class="el-icon-arrow-down el-icon--right"></i>
        </span>
        <template #dropdown>
          <el-dropdown-menu>
            <el-dropdown-item @click="$router.push('/person')">个人信息</el-dropdown-item>
            <el-dropdown-item @click="$router.push('/login')">退出系统</el-dropdown-item>
          </el-dropdown-menu>
        </template>
      </el-dropdown>
    </div>
  </div>
</template>

<script>
export default {
  name: "Header",
  props: ['user'],
  data() {
    return {

    }
  },
  created() {
    console.log('user')
  }
}
</script>

<style scoped>

</style>
